package com.example.managerback.utils;


import com.example.managerback.entity.Employee;

import java.util.HashMap;
import java.util.List;

public class BaseResult {

    private static List<Employee> employees;
    private String code;
    private String msg;
    private Object data;

    public static BaseResult success(){
        BaseResult result = new BaseResult();
        result.setCode("200");
        result.setMsg("success");
        return result;
    }

    public static BaseResult success(Object data) {
        BaseResult result = new BaseResult();
        result.setCode("200");
        result.setMsg("success");
        result.setData(data);
        return result;
    }

    public static BaseResult success(HashMap<String, String> map) {
        BaseResult result = new BaseResult();
        result.setCode("200");
        result.setMsg("success");
        result.setData(map);
        return result;
    }

    public static BaseResult success(String 服务器数据) {
        BaseResult result = new BaseResult();
        result.setCode("200");
        result.setMsg("success");
        result.setData(null);
        return result;
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public Object getData() {
        return data;
    }
    public void setData(Object data) {
        this.data = data;
    }

}
